Field of the Invention
The present invention relates to an information processing apparatus having a Web browser, connected to a Web server, that displays operation screens provided from the Web server, to a method of controlling the same, and to a storage medium.
Description of the Related Art
An information processing apparatus such as a PC, or the like, being connected to a Web server on a network, and displaying operation screens provided by the Web server on a Web browser that the information processing apparatus is provided with is known. In such a case, firstly, the Web browser of the information processing apparatus requests (request) information of an operation screen of the Web server. In response to this request, a Web application of the Web server transmits (response), to the information processing apparatus, HTML data in order to cause the Web browser to display the operation screen. With this, the Web browser of the information processing apparatus analyzes the received HTML data, and displays the operation screen based on the definition of that HTML data. Furthermore, when a user inputs an instruction via the operation screen displayed by the Web browser, the Web browser notifies the Web server of that input instruction. Then, a Web application of the Web server having received the notification executes processing in accordance with that input instruction.
Note, in recent years, there are multi function peripherals (MFP) having a scanner, a printer, or the like, that are provided with Web browsers such as those described above. These kinds of MFPs display operation screens provided by a Web server using the above described procedure with the Web browser of the MFP, and accept various instructions from users. Furthermore, systems in which a Web server provides an operation screen with which to input instructions for using various functions that the MFP is provided with, and a user inputs instructions into the MFP via the provided operation screen are being considered. With such systems, the Web server requests of the MFP the execution of various processing in accordance with the content of the instructions input by the user. A job execution module of the MFP that received this request executes the requested processing. With this, it becomes unnecessary to hold all of the operation screen information for operating the MFP in the MFP, and the modification of an operation screen can be performed easily on the Web server.
More specifically, an approach of publishing various functions of the MFP with RPCs (Remote Procedure Call), and calling functions that are instructed from the Web server as appropriate is being considered. In this approach, by having the main logic of the processing in the Web server, and causing the Web server to execute control of the MFP, user interactive processing, or the like, a processing load on the MFP can be reduced. For example, by publishing functions of the MFP as Web services, the MFP can call a local subroutine of the Web server, and execute a function that the MFP provides. Also, by managing the response to such a call, it is possible to have the main logic of the processing in the Web server.
However, because an RPC is initiated by the client transmitting a request message to the server, it is necessary for a communication connection to be made from the client to the server that provides the service. In other words, in this approach, in a case where the MFP is protected by a firewall, or is in an environment in which network address translation is used, the MFP cannot receive RPC requests from a Web server existing on an external network. This is because firewalls generally permit connections from within to the outside, but do not permit connections from outside to within. Also, this is because, in a case where the MFP is in an environment using address translation, the MFP cannot be identified from the server side.
Here, operating by a Web server providing a control script based on an instruction input via an operation screen displayed by a Web browser of a device, and the device executing that control script is conceivable. The control script is received by the Web browser as a response corresponding to a request from the Web browser, and is transferred to the job execution module. For this reason, it is not necessary to make a connection from the Web server to the MFP, and usage is possible even in a case where the MFP is protected by a firewall, or is in an environment that uses network address translation.
However, in a case when this kind of arrangement is used, the job execution module cannot know which server the request is from in a case where there are a plurality of processing request request source servers. This is because it is the Web browser that receives the control script, and the job execution module merely receives the control script transferred from the Web browser. For example, in a case where the job execution module is a module for providing information of the device, or of the user that is using the device, from the viewpoint of security, there are cases where it is desirable that the job execution module only executes requests from particular servers, but this cannot be realized due to the above described problem.
Here, a technique such as that of Japanese Patent Laid-Open No. 2011-8349 is being considered. In the method recited in Japanese Patent Laid-Open No. 2011-8349, by putting necessary information in an HTTP request header when the Web browser accesses the Web server, information of the device is communicated to the Web server. Also, here, it is determined whether or not an accessing URI matches a pattern stored in advance, and in a case of a match, the information is transmitted.
However, because in the method of Japanese Patent Laid-Open No. 2011-8349, information is added every time the Web browser accesses the Web server, there is a problem in that a communication cost is incurred when there is a large amount of information transmitted. Also, from the viewpoint of security, it is advantageous to suppress the number of transmissions to a minimum by not transmitting information in a case where a Web application is not necessary.